<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>#EscapeChar (and explanation of escape sequences)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>#EscapeChar (and explanation of escape sequences)</h1>

<p>Changes the script's escape character (e.g. accent vs. backslash).</p>

<pre class="Syntax">#EscapeChar NewChar</pre>
<h3>Parameters</h3>
<dl>

  <dt>NewChar</dt>
  <dd><p>Specify a single character.</p></dd>

</dl>
<h3>Remarks</h3>
<p>The escape character is used to indicate that the character immediately following it should be interpreted differently than it normally would.</p>
<p>The default escape character is accent/backtick (`).</p>
<h3>Escape Sequences (when accent is the escape character)</h3>
<table class="info">
  <tr>
    <th>Type This</th>
    <th>To Get This</th>
  </tr>
  <tr>
    <td width="15%">`,</td>
    <td width="85%">, (literal comma). <strong>Note:</strong> Commas that appear within the last parameter of a command do not need to be escaped because the program knows to treat them literally. The same is true for all parameters of <a href="MsgBox.htm">MsgBox</a> because it has smart comma handling.</td>
  </tr>
  <tr>
    <td>`%</td>
    <td>% (literal percent)</td>
  </tr>
  <tr>
    <td>``</td>
    <td>` (literal accent; i.e. two consecutive escape characters result in a single literal character)</td>
  </tr>
  <tr>
    <td>`;</td>
    <td>&nbsp;; (literal semicolon). <strong>Note:</strong> This is necessary <u>only</u> if a semicolon has a space or tab to its left. If it does not, it will be recognized correctly without being escaped.</td>
  </tr>
  <tr>
    <td>`::</td>
    <td>:: (literal pair of colons). In v1.0.40+, it is no longer necessary to escape these.</td>
  </tr>
  <tr>
    <td>`n</td>
    <td>newline (linefeed/LF)</td>
  </tr>
  <tr>
    <td>`r</td>
    <td>carriage return (CR)</td>
  </tr>
  <tr>
    <td>`b</td>
    <td>backspace</td>
  </tr>
  <tr>
    <td>`t</td>
    <td>tab (the more typical horizontal variety)</td>
  </tr>
  <tr>
    <td>`v</td>
    <td>vertical tab -- corresponds to Ascii value 11. It can also be manifest in some applications by typing Control+K.</td>
  </tr>
  <tr>
    <td>`a</td>
    <td>alert (bell) -- corresponds to Ascii value 7. It can also be manifest in some applications by typing Control+G.</td>
  </tr>
  <tr>
    <td>`f</td>
    <td>formfeed -- corresponds to Ascii value 12. It can also be manifest in some applications by typing Control+L.</td>
  </tr>
  <tr>
    <td>Send</td>
    <td>When the <a href="Send.htm">Send command</a> or <a href="../Hotstrings.htm">Hotstrings</a> are used in their default (non-raw) mode, characters such as {}^!+# have special meaning. Therefore, to use them literally in these cases, enclose them in braces. For example: <code>Send {<strong>^</strong>}{<strong>!</strong>}{<strong>{</strong>}</code>.</td>
  </tr>
  <tr>
    <td>&quot;&quot;</td>
    <td>Within an <a href="../Variables.htm#Expressions">expression</a>, two consecutive quotes enclosed inside a literal string resolve to a single literal quote. For example: <code>Var := &quot;The color &quot;&quot;red&quot;&quot; was found.&quot;</code>.</td>
  </tr>
</table>
<h3>Related</h3>
<p><a name="DerefChar"></a><a name="Delimiter"></a>The following rarely used directives also exist; their usage is shown in these examples:</p>
<pre>#DerefChar #  <em>; Change it from its normal default, which is %.</em>
#Delimiter /  <em>; Change it from its normal default, which is comma.</em></pre>
<h3>Example</h3>
<pre class="NoIndent">#EscapeChar \  <em>; Change it to be backslash instead of the default of accent (`).</em></pre>

</body>
</html>
